from db_init import engine, person_table

with engine.connect() as conn:
    query = person_table.select()
    result_set = conn.execute(query)

    # for row in result_set:
    #     print(row[0]) # 每行的第一个元素
    #     print(row.name) # 绑定上每行的name元素是什么
    #     """
    #     如果列名不对
    #     print(row.name1)
    #     结果：
    #     AttributeError: Could not locate column in row for column 'name1'
    #     """

    row = result_set.fetchall() # 返回的list列表
    print(row)

